// 知识库
const route = {
  path: '/knowledge_mgt',
  name: 'knowledge_mgt',
  meta: {
    roles: ['knowledge_mgt'],
    title: '知识库',
    icon: 'zhishiku-weixuan',
    activeIcon: 'zhishiku-xuanzhong',
    group: 'app'
  },
  redirect: '/knowledge_mgt/index',
  component: () => import(/* webpackChunkName: "main-index" */ '@views/index.vue'),
  children: [
    {
      path: 'index',
      meta: {
        roles: ['knowledge_mgt']
      },
      name: 'kmIndex',
      component: () => import(/* webpackChunkName: "km" */ '@/views/km/index.vue'),
      children: [
        {
          path: 'knowledge_mgt_channel',
          name: 'knowledgeBase',
          meta: {
            roles: ['knowledge_mgt_channel'],
            title: '知识库',
            group: 'kmChannel'
          },
          component: () => import(/* webpackChunkName: "knowledgeBase" */ '@/views/km/knowledgeBase/index.vue'),
          children: [
            {
              path: ':id',
              name: 'kmSummary',
              meta: {
                roles: ['knowledge_mgt_channel_1']
              },
              component: () => import(/* webpackChunkName: "kmSummary" */ '@/views/km/knowledgeBase/kmSummary.vue')
            }
          ]
        },
        {
          path: 'common_language',
          name: 'commonIndex',
          meta: {
            roles: ['common_language'],
            title: '公共常用语',
            group: 'phrase'
          },
          component: () => import(/* webpackChunkName: "commonIndex" */ '@/views/km/phrase/commonIndex.vue'),
          children: [
            {
              path: ':id',
              name: 'phraseSummary',
              meta: {
                roles: ['common_language']
              },
              component: () => import(/* webpackChunkName: "phraseSummary" */ '@/views/km/phrase/phraseSummary.vue')
            }
          ]
        },
        {
          path: 'personal_language',
          name: 'personalIndex',
          meta: {
            roles: ['personal_language'],
            title: '个人常用语',
            group: 'phrase'
          },
          component: () => import(/* webpackChunkName: "personalIndex" */ '@/views/km/phrase/personalIndex.vue'),
          children: [
            {
              path: ':id',
              name: 'phraseSummary',
              meta: {
                roles: ['personal_language']
              },
              component: () => import(/* webpackChunkName: "phraseSummary" */ '@/views/km/phrase/phraseSummary.vue')
            }
          ]
        }
      ]
    }
  ]
}

export default route
